package com.chushouya.manager.service.admin;


import com.general.framework.core.enums.ContextUserType;
import com.chushouya.manager.dto.admin.log.LoginLogDTO;
import com.chushouya.manager.dto.admin.log.LoginLogListDTO;
import com.chushouya.manager.dto.admin.log.LoginLogQueryDTO;
import com.general.framework.core.schema.PageResult;
import org.springframework.scheduling.annotation.Async;

/**
 * 登录信息
 */
public interface LoginLogService {

    /**
     * 清空登录日志
     */
    void clean(Integer cleanBeforeDays);

    /**
     * 分页查询登录日志
     */
    PageResult<LoginLogListDTO> selectLoginInfoPageResult(LoginLogQueryDTO query);

    @Async
    void saveLoginLog(ContextUserType userType, String userName, String status, String message);

    @Async
    void saveLoginLog(LoginLogDTO log);
}
